package off_transaction

import (
	// "bp/cache"
	sqlc "bp/db/sqlc"
	// "bp/internal/util"
	"context"
)

// ListOffTrialItemPtrs 列出优惠试算项目
func (s *OffTransactionEntityServiceImp) ListOffTransactionDetailPtrsByTransactionID(ctx context.Context, q *sqlc.Queries, transactionID int64) (offTransactionDetailPtrs []*sqlc.OffTransactionDetail, err error) {
	// slog := util.NewContextLogger(ctx, s.slog)
	rows, err := q.ListOffTransactionDetailsByTransactionID(ctx, transactionID)
	if err != nil {
		return
	}
	// slog.Infof("1 ListOffTransactionDetailPtrsByTransactionID ok")
	offTransactionDetailPtrs = s.MapOffTransactionDetailEntityToPtr(rows)
	return
}
